package ewms.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import ewms.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 报表VO
 */
public class EwmsReportVo {

	/**
	 * 危废入库日报表
	 */
	@ApiModel("危废入库日报表")
	@Data
	@Accessors(chain = true)
	public static class EntryWarehouseReportVo {

		private static final long serialVersionUID = 1L;

		@Excel(name = "日期")
		@ApiModelProperty("入库日期")
		private String entryDate;

		/**
		 * 废弃物名称
		 */
		@Excel(name = "废弃物名称", width = 45)
		@ApiModelProperty("废弃物名称")
		private String wasteName;

		/**
		 * 入库数量
		 */
		@Excel(name = "入库数量 (吨)", scale = 2)
		@ApiModelProperty("入库数量")
		private BigDecimal wasteWeight;

		/**
		 * 包装类别key
		 */
//		@Excel(name = "包装类别")
		@ApiModelProperty("包装类别key")
		private String packageType;

		/**
		 * 包装形式
		 */
		@Excel(name = "包装形式")
		@ApiModelProperty("包装形式")
		private String packageTypeName;

		/**
		 * 容器数量
		 */
		@Excel(name = "容器数量")
		@ApiModelProperty("容器数量")
		private Integer containCount;

		/**
		 * 存放位置
		 */
		@Excel(name = "存放位置")
		@ApiModelProperty("存放位置")
		private String warehouseName;

		/**
		 * 接收人
		 */
		@Excel(name = "接收人")
		@ApiModelProperty("接收人")
		private String createBy;

		/**
		 * 接收人签字
		 */
		@Excel(name = "接收人签字")
		@ApiModelProperty("接收人签字")
		private String PersonSignature;
	}

	/**
	 * 危废出库日报表 Vo
	 */
	@ApiModel("危废出库日报表")
	@Accessors(chain = true)
	@Data
	public static class OutWarehouseReportVo {

		private static final long serialVersionUID = 1L;

		@Excel(name = "日期")
		@ApiModelProperty("出库日期")
		private String outDate;

		/**
		 * 废弃物名称
		 */
		@Excel(name = "危废名称", width = 45)
		@ApiModelProperty("危废名称")
		private String wasteName;

		/**
		 * 包装类别key
		 */
//		@Excel(name = "包装类别")
		@ApiModelProperty("包装类别key")
		private String packageType;

		/**
		 * 包装形式
		 */
		@Excel(name = "包装形式")
		@ApiModelProperty("包装形式")
		private String packageTypeName;

		/**
		 * 容器数量
		 */
		@Excel(name = "容器数量")
		@ApiModelProperty("容器数量")
		private Integer containCount;

		/**
		 * 存放位置
		 */
		@Excel(name = "存放位置")
		@ApiModelProperty("存放位置")
		private String warehouseName;

		/**
		 * 出库数量
		 */
		@Excel(name = "出库数量 (吨)", scale = 2)
		@ApiModelProperty("出库数量")
		private BigDecimal outWeight;

		/**
		 * 出库去向
		 */
		@Excel(name = "出库去向")
		@ApiModelProperty("出库去向")
		private String handleMethodName;

		/**
		 * 经手人
		 */
		@Excel(name = "经手人")
		@ApiModelProperty("经手人")
		private String createBy;

		/**
		 * 经手人签字
		 */
		@Excel(name = "经手人签字")
		@ApiModelProperty("经手人签字")
		private String PersonSignature;

		/**
		 * 库存
		 */
		@Excel(name = "库存 (吨)", scale = 2)
		@ApiModelProperty("库存")
		private BigDecimal inventoryWeight;
	}

	@Accessors(chain = true)
	@Data
	@ApiModel("危废全流程视图对象")
	public static class WasteFlowInfoVo {

		private static final long serialVersionUID = 1L;

		/**
		 * 危废ID
		 */
		@ApiModelProperty("危废ID")
		private Long wasteId;

		/**
		 * 批次号码
		 */
		@Excel(name = "批次号码", width = 25)
		@ApiModelProperty("批次号码")
		private String batchNumber;

		/**
		 * 危废状态
		 */
		@Excel(name = "危废状态")
		@ApiModelProperty("危废状态")
		private Long status;

		/**
		 * 危废名称
		 */
		@Excel(name = "危废名称", width = 45)
		@ApiModelProperty("危废名称")
		private String wasteName;

		/**
		 * 预估重量
		 */
		@Excel(name = "预估重量", scale = 2)
		@ApiModelProperty("预估重量")
		private BigDecimal wasteDiscreetWeight;

		/**
		 * 申报人
		 */
		@Excel(name = "申报人")
		@ApiModelProperty("申报人")
		private String declareOperator;

		/**
		 * 申报日期
		 */
		@Excel(name = "申报日期", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("申报日期")
		private Date declareDate;

		/**
		 * 危废分类ID
		 */
		@ApiModelProperty("危废分类ID")
		private Long wasteTypeId;

		/**
		 * 废弃物分类名称
		 */
		@ApiModelProperty("废弃物分类名称")
		private String wasteTypeName;

		/**
		 * 收运人
		 */
		@Excel(name = "收运人")
		@ApiModelProperty("收运人")
		private String collectorOperator;

		/**
		 * 收运日期
		 */
		@Excel(name = "收运日期", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("收运日期")
		private Date collectDate;

		/**
		 * 仓库名称
		 */
		@Excel(name = "仓库名称")
		@ApiModelProperty("仓库名称")
		private String warehouseName;

		/**
		 * 危废实重
		 */
		@Excel(name = "危废实重", scale = 2)
		@ApiModelProperty("危废实重")
		private BigDecimal wasteWeight;

		/**
		 * 入库时间
		 */
		@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("入库时间")
		private Date entryDate;

		/**
		 * 入库操作者
		 */
		@Excel(name = "入库操作者")
		@ApiModelProperty("入库操作者")
		private String entryOperator;

		/**
		 * 原仓库
		 */
		@Excel(name = "原仓库")
		@ApiModelProperty("原仓库")
		private String fromWarehouseName;

		/**
		 * 转至仓库id
		 */
		@ApiModelProperty("转至仓库id")
		private Long toWarehouseId;

		/**
		 * 转入仓库
		 */
		@Excel(name = "转入仓库")
		@ApiModelProperty("转入仓库")
		private String toWarehouseName;

		/**
		 * 转库时间
		 */
		@Excel(name = "转库时间", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("转库时间")
		private Date transferDate;

		/**
		 * 转库操作者
		 */
		@Excel(name = "转库操作者")
		@ApiModelProperty("转库操作者")
		private String transferOperator;

		/**
		 * 出库时间
		 */
		@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("出库时间")
		private Date outDate;

		/**
		 * 出库操作者
		 */
		@Excel(name = "出库操作者")
		@ApiModelProperty("出库操作者")
		private String outOperator;

		/**
		 * 处置方式(字典配置)
		 */
		@Excel(name = "处置方式", dictType = "waste_handler_method")
		@ApiModelProperty("处置方式(字典配置)")
		private String handleMethod;

		/**
		 * 处置公司名称
		 */
		@Excel(name = "处置公司", dictType = "waste_handle_company", width = 45)
		@ApiModelProperty("处置公司")
		private String handleCompanyKey;

		/**
		 * 焚化方式
		 */
		@Excel(name = "焚化方式", dictType = "incinerate_method")
		@ApiModelProperty("焚化方式")
		private String incinerateMethod;

		/**
		 * 焚化时间
		 */
		@Excel(name = "焚化时间", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("焚化时间")
		private Date incinerateDate;

		/**
		 * 焚化操作者
		 */
		@Excel(name = "焚化操作者")
		@ApiModelProperty("焚化操作者")
		private String incinerateOperator;

		/**
		 * 危废编码
		 */
		@ApiModelProperty("危废编码")
		private String wasteCode;

		/**
		 * 包装类别
		 */
		@ApiModelProperty("包装类别")
		private String packageType;

		/**
		 * 处置方式
		 */
		@ApiModelProperty("处置方式")
		private String handlerMethod;

		/**
		 * 危废形态
		 */
		@ApiModelProperty("危废形态")
		private String wasteShape;

		/**
		 * 安全措施
		 */
		@ApiModelProperty("安全措施")
		private String securityMeasure;

		/**
		 * 危险特性
		 */
		@ApiModelProperty("危险特性")
		private String hazardousCharacteristics;
	}

	@Accessors(chain = true)
	@Data
	@ApiModel("危废出入库月报表")
	public static class EntryAndOutWarehouseMonthReportVo {

		private String reportDate;

		private String wasteId;

		@Excel(name = "危废名称", width = 45)
		@ApiModelProperty("危废名称")
		private String wasteName;

		@Excel(name = "当月入库数量（吨）", scale = 2)
		@ApiModelProperty("当月入库数量（吨）")
		private BigDecimal entryWeight;

		@Excel(name = "当月出库数量（吨）", scale = 2)
		@ApiModelProperty("当月出库数量（吨）")
		private BigDecimal outWeight;

		private Long dateInt;

		@Excel(name = "上月库存量（吨）", scale = 2)
		@ApiModelProperty("上月库存量（吨）")
		private BigDecimal lastMonthStockWeight;

		@Excel(name = "当月结存量（吨）", scale = 2)
		@ApiModelProperty("当月结存量（吨）")
		private BigDecimal currentMonthStockWeight;
	}

	/**
	 * 危废委外处置报表视图
	 */
	@Accessors(chain = true)
	@Data
	@ApiModel("危废委外处置报表视图")
	public static class WasteOutFactoryReportVo {

		/**
		 * 日期
		 */
		@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
		@JsonFormat(pattern = "yyyy-MM-dd")
		@ApiModelProperty("日期")
		private Date reportDate;

		@Excel(name = "放行证号")
		@ApiModelProperty("放行证号")
		private String leaveNo;

		@Excel(name = "处置公司", width = 45)
		@ApiModelProperty("处置公司")
		private String handleCompany;

		@Excel(name = "危废名称", width = 45)
		@ApiModelProperty("危废名称")
		private String wasteName;

		@Excel(name = "出库数量（吨）", scale = 2)
		@ApiModelProperty("出库数量（吨）")
		private BigDecimal outWarehouseWeight;

		@Excel(name = "毛重（吨）", scale = 2)
		@ApiModelProperty("毛重（吨）")
		private BigDecimal totalWeight;

		@Excel(name = "净重（吨）", scale = 2)
		@ApiModelProperty("净重（吨）")
		private BigDecimal netWeight;

		@Excel(name = "转移联单号")
		@ApiModelProperty("转移联单号")
		private String transferNumber;

	}

	/**
	 * 危废焚化处置临时表视图
	 */
	@Accessors(chain = true)
	@Data
	@ApiModel("危废焚化处置临时表视图")
	public static class WasteIncinerateHandleReportTempVo {

		private String reportDate;
		private String wasteId;
		private String wasteName;
		private String dateWasteId;
		private BigDecimal wasteWeight;
	}


	@Accessors(chain = true)
	@Getter
	@Setter
	@ToString
	@EqualsAndHashCode
	public static class WasteIncinerateHandleWasteInfo{
		private String wasteId;
		private String wasteName;

		public WasteIncinerateHandleWasteInfo(String wasteId, String wasteName){
			this.wasteId = wasteId;
			this.wasteName = wasteName;
		}
	}
}
